#include "mainwindow.h"
#include <QApplication>
#include <QTextCodec>
#include "GlobalApi/sqlitedb.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QTextCodec *codec = QTextCodec::codecForName("UTF-8");
    QTextCodec::setCodecForLocale(codec);
    QTextCodec::setCodecForCStrings(codec);
    QTextCodec::setCodecForTr(codec);

    SqliteDb::getInstance()->setDbName("KT6XDatabase.db");
    bool isOk = SqliteDb::getInstance()->openDatabase();
    if(!isOk)
    {
      return 0;
    }


    MainWindow w;
    w.show();

    return a.exec();
}
